<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../template/taglib.jsp" %>

<jsp:include page="../template/header.jsp" />

<jsp:include page="../template/staffmenu.jsp" />

<%-- content template --%>
<jsp:include page="../template/contentheader.jsp" />
<%-- put content here --%>
<link href="/css/style.css" rel="stylesheet" type="text/css"/>
<fmt:setBundle basename="staff" />
<form action ="/ManageStaffLeaveServlet" method=post>
<table>
	<tr>
		<td bgcolor="#FFFFFF" colspan="2" align="center"><font
			color="#848000">Manage Leave History</font></td>
	</tr>
	<tr>
		<td>View By Leave Type:</td>

		<td><select name="id">
				<option value="0">All</option>
				<option value="1">Annual</option>
				<option value="2">Medical</option>
				<option value="3">Compensation</option>
		</select></td>
		<td><input type="submit" value="Show" name="btnshow" /></td>
	</tr>



	<tr>
		<th><fmt:message key="lable.staff.id" /></th>
		<th><fmt:message key="lable.leave.type" /></th>
	    <th><fmt:message key="lable.leave.startdate" /></th>
		<th><fmt:message key="lable.leave.enddate" /></th>
		<th><fmt:message key="lable.leave.natureofleave" /></th>
		<th><fmt:message key="lable.leave.status" /></th>
		<th>&nbsp;</th>
	</tr>
	<c:forEach var="stat" items="${status}">
	<tr>
		<td>${stat.id}</td>
		<td>${stat.leaveTypeName}</td>
		<td>${stat.startDate }</td>
		<td>${stat.endDate}</td>
		<td>${stat.natureOfLeave}</td>
		<td>${stat.status}</td>	
		<td>
		<c:url var="detailurl" scope="page" value="/manageDetailLeave.jsp">
			<c:param name="id" value="${stat.id}"/>
			<c:param name="leavetype" value="${stat.leaveType}"/>
			<c:param name="startdate" value="${stat.startDate}"/>
			<c:param name="enddate" value="${stat.endDate}"/>
			<c:param name="natureOfLeave" value="${stat.natureOfLeave}"/>
			<c:param name="status" value="${stat.status}"/>
			<c:param name="comment" value="${stat.comment}" />
			<c:param name="back" value="/LeaveApplicationProcessingSystem/ManageStaffLeaveServlet" />
			<c:param name="update" value="false"/>
		</c:url>
		<a href="detailurl"><fmt:message key="lable.staff.detail"/></a> 
	</tr>
	</c:forEach>
</table>
</form>

<jsp:include page="../template/contentfooter.jsp" />
<%-- end of content template --%>

<jsp:include page="../template/footer.jsp" />



